
<h2>My heroes</h2>
<ul *ngFor="let hero of heroes" class="heroes">
  <li [class.selected]="hero === selectedHero" 
      (click)="onSelectHero(hero)">
      <a routerLink="/hero/{{hero.id}}">
        <span class="badge">{{hero.id}}</span> {{hero.name}}
      </a>
      <button class="delete" title="delete hero"
        (click)="delete(hero)">x</button>
  </li>
</ul>
<div>
  <label>Hero name:
    <input #heroName />
  </label>
  <button (click)="add(heroName.value); heroName.value=''">
    add
  </button>
</div>
